package main

import (
	"card/app/cmd"
	"card/app/cmd/make"
	"log"
)

func main() {
	// 注册子命令
	cmd.RegisterGlobalFlags(cmd.RootCmd)
	cmd.RootCmd.AddCommand(
		cmd.CmdKey,
		cmd.CmdServer,
		cmd.CmdCache,
		cmd.CmdPlay,
		make.CmdMake,
	)
	cmd.RegisterDefaultCmd(cmd.RootCmd, cmd.CmdServer)
	err := cmd.RootCmd.Execute()
	if err != nil {
		log.Printf("err%v\n", err)
	}
}
